/*
 * @(#) UserEntity.java 2011-9-12
 *
 * Copyright (c) 2011, Strong Technology. All Rights Reserved.
 * Strong Technology. CONFIDENTIAL
 */
package cn.strong.gweva.system.business.entity;

import cn.strong.gweva.common.business.entity.db.JxkhUserEntity;
import cn.strong.gweva.common.util.CodeBook;

/**
 * 用户详细信息。
 * 
 * @author lilanfei
 * @version 1.0
 * @since 2011-9-12
 */
public class UserEntity extends JxkhUserEntity
{
	/**  */
	private static final long serialVersionUID = -935377168810099069L;
	/** 工作人员姓名 */
	private String workerName;
	/** 岗位编号 */
	private Integer jobId;
	/** 岗位名称 */
	private String jobName;
	/** 角色名称 */
	private String roleName;
	/**
	 * 获取
	 * @return workerName
	 */
	public String getWorkerName()
	{
		return workerName;
	}
	/**
	 * 设定
	 * @param workerName 
	 */
	public void setWorkerName(String workerName)
	{
		this.workerName = workerName;
	}
	/**
	 * 获取
	 * @return jobId
	 */
	public Integer getJobId()
	{
		return jobId;
	}
	/**
	 * 设定
	 * @param jobId 
	 */
	public void setJobId(Integer jobId)
	{
		this.jobId = jobId;
	}
	/**
	 * 获取
	 * @return jobName
	 */
	public String getJobName()
	{
		return jobName;
	}
	/**
	 * 设定
	 * @param jobName 
	 */
	public void setJobName(String jobName)
	{
		this.jobName = jobName;
	}
	/**
	 * 获取
	 * @return roleName
	 */
	public String getRoleName()
	{
		this.roleName = "";
		if (this.getRoleId() != null)
		{
			CodeBook.ROLE arr = CodeBook.ROLE.valueOfCode(this.getRoleId());
			this.roleName = arr.getName();
		}
		return roleName;
	}
	/**
	 * 设定
	 * @param roleName 
	 */
	public void setRoleName(String roleName)
	{
		this.roleName = roleName;
	}
	
	/**
	 * @return 是否是超级管理员。
	 */
	public boolean getIsSuperAdmin()
	{
		return CodeBook.ROLE.isSuperAdmin(this.getRoleId());
	}

}
